using System;
using System.ComponentModel;

namespace sharpCash
{
    public enum TransactionType
    {
        [Description("Basic Credit")]
        CREDIT,
        [Description("Basic Debit")]
        DEBIT,
        [Description("Interest")]
        INT,
        [Description("Dividend")]
        DIV,
        [Description("Fee")]
        FEE,
        [Description("Service Charge")]
        SRVCHG,
        [Description("Deposit")]
        DEP,
        [Description("ATM transfer")]
        ATM,
        [Description("Point of Sale transfer")]
        POS,
        [Description("Transfer")]
        XFER,
        [Description("Check")]
        CHECK,
        [Description("Payment")]
        PAYMENT,
        [Description("Cash Withdrawl")]
        CASH,
        [Description("Direct Deposit")]
        DIRECTDEP,
        [Description("Merchant Initiated Debit")]
        DIRECTDEBIT,
        [Description("Repeating Payment")]
        REPEATPMT,
        OTHER,
    }
    public enum AccountType
    {
        [Description("Bank Account")]
        BANK,
        [Description("Credit Card Account")]
        CC,
        [Description("Accounts Payable")]
        AP,
        [Description("Accounts Recievable")]
        AR,
        NA,
    }
    public enum BankAccountType
    {
        [Description("Checking Account")]
        CHECKING,
        [Description("Savings Account")]
        SAVINGS,
        [Description("Money Market Account")]
        MONEYMRKT,
        [Description("Line of Credit")]
        CREDITLINE,
        NA,
    }
    /// <summary>
    /// ColumnAttribute - This stores the attributes for the Data Grid Columns.
    /// </summary>
    [AttributeUsage(AttributeTargets.All,
        AllowMultiple = true)]
    public class ColumnAttribute : System.Attribute
    {
        private bool visableDef;
        private string colName;
        private bool visableAllowed;
        private int colOrder = 0;
        private Type typeOfMe;
        private Type sortType;
        public ColumnAttribute()
        {
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="visableDefault">Is the column default to visable?</param>
        /// <param name="columnName">Whats the column name?</param>
        /// <param name="allowed">Is this column allowed to be seen?</param>
        public ColumnAttribute(bool visableDefault, string columnName, bool allowed)
        {
            this.visableDef = visableDefault;
            this.colName = columnName;
            this.visableAllowed = allowed;
        }
        public override object TypeId
        {
            get { return null; }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="visableDefault">Is the column default to visable?</param>
        /// <param name="columnName">Whats the column name?</param>
        /// <param name="allowed">Is this column allowed to be seen?</param>
        /// <param name="type">What type of sorting should I use? (Currently only string and DateTime is used)</param>
        public ColumnAttribute(bool visableDefault, string columnName, bool allowed, Type type)
        {
            this.sortType = type;
            this.visableDef = visableDefault;
            this.colName = columnName;
            this.visableAllowed = allowed;
        }
        public bool VisableDef
        {
            get { return visableDef; }
            set { visableDef = value; }
        }
        public string ColumnName
        {
            get { return colName; }
            set { colName = value; }
        }
        public bool VisableAllowed
        {
            get { return visableAllowed; }
            set { visableAllowed = value; }
        }
        public int ColumnOrder
        {
            get { return colOrder; }
            set { colOrder = value; }
        }
        public Type typeOfAttr()
        {
            return typeOfMe;
        }
        public void SetTypeOfAttr(Type type)
        {
            typeOfMe = type;
        }
        public Type SortType()
        {
            return sortType;
        }
    }
}
